import Vue from 'vue'
import Vuex from 'vuex'
import {
  getItem,
  setItem
} from '@/utils/store'
Vue.use(Vuex)
const T_USET = 'TOUTIAO_USER'
export default new Vuex.Store({
  state: {
    user: getItem(T_USET)
  },
  mutations: {
    setUser(state, user) {
      state.user = user
      setItem(T_USET, state.user)
    }
  },
  actions: {},
  modules: {}
})
